from django.db import models

# Create your models here.


class DepartmentCateModel(models.Model):
    name = models.CharField(max_length=100)

    class Meta:
        db_table = 'dxdepartmentcatemodel'




class DepartmentModel(models.Model):
    dname = models.CharField(max_length=100)
    order = models.IntegerField(default=1)
    isshow = models.BooleanField(default=True)
    cate = models.ForeignKey(DepartmentCateModel, on_delete=models.CASCADE, related_name='cates')
    class Meta:
        db_table = 'dxdepartmentmodel'
    def __str__(self):
        return self.dname




